package com.liy.cloud.base.service.impl;

import com.liy.cloud.base.dao.BaseTypeParamDao;
import com.liy.cloud.base.entity.BaseTypeParamEntity;
import com.liy.cloud.base.service.BaseTypeParamService;
import com.das.framework.common.dao.IBaseDao;
import com.das.framework.common.service.impl.BaseServiceImpl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class BaseTypeParamServiceImpl extends BaseServiceImpl<BaseTypeParamEntity, String> implements BaseTypeParamService {

	@Autowired
	private BaseTypeParamDao baseTypeParamDao;

	@Override
	public IBaseDao<BaseTypeParamEntity, String> getDao() {
		return baseTypeParamDao;
	}


	@Override
	public int addBaseEquInfo(BaseTypeParamEntity baseTypeParamEntity) throws Exception {
		return this.add(baseTypeParamEntity);
	}

	@Override
	public void deleteBatch(List<String> ids) {
		for (String id : ids) {
			baseTypeParamDao.deleteByPrimaryKey(id);
		}
	}

	@Override
	public String selectMaxParamSn(String groupname) {
		return baseTypeParamDao.selectMaxParamSn(groupname);
	}

}
